from pydantic import BaseModel

from forward.extend.pydantic.base import BaseSchema
from forward.model.schemas.lucky.prize import PrizeSchema
from forward.utils.tools import ToolsUtil


class PrizeAddInSchema(PrizeSchema):
    pass


class PrizeEditInSchema(PrizeSchema):
    id: int


class PrizeListInSchema(BaseSchema):
    name: str | None = None
    img: str | None = None
    status: int | None = None
    num: int | None = None
    page_num: int = 1
    page_size: int = 20
    model_config = {
        "alias_generator": ToolsUtil.to_lower_camel,
        "populate_by_name": True,
    }


class PrizeDetailInSchema(BaseModel):
    id: int


class PrizeDeleteInSchema(BaseModel):
    id: int


class GenerateInSchema(BaseModel):
    count: int


class PrizeStatusInSchema(BaseModel):
    id: int
    status: int
